/*
 * @Author: kongfanqiang
 * @Email: 1260470885@qq.com
 * @Date: 2021-03-15 17:48:19
 * @LastEditTime: 2021-03-15 19:39:08
 * @Description: 使用官方模块
 */
import { h } from 'snabbdom/h'
import { init } from 'snabbdom/init'
import { styleModule } from 'snabbdom/modules/style'
import { eventListenersModule } from 'snabbdom/modules/eventlisteners'
let vnode = h('div#app', {
  style: {
    backgroundColor: '#f00',
    color: '#fff'
  },
  on: {
    click () {
      console.log(2323)
    }
  }
}, h('div', 'fdjfiejfowejfwoiejo'))
const patch = init([
  styleModule,
  eventListenersModule
])
const app = document.querySelector('#app')
patch(app, vnode)
